package cn.invest.merry.module.invest.service.vo;

import lombok.Data;
import org.springframework.util.StringUtils;

@Data
public class BaseVo {

    private String scode;

    private String rdate;

    private String type;

    private String source;

    private String sdate;

    private String edate;

    private String format;

    private boolean cover;

    public String getParam(){
        StringBuilder url = new StringBuilder();
        if(!StringUtils.isEmpty(scode)){
            url.append("&scode=" + scode);
        }
        if(!StringUtils.isEmpty(rdate)){
            url.append("&rdate=" + rdate);
        }
        if(!StringUtils.isEmpty(type)){
            url.append("&type=" + type);
        }
        if(!StringUtils.isEmpty(source)){
            url.append("&source=" + source);
        }
        if(!StringUtils.isEmpty(sdate)){
            url.append("&sdate=" + sdate);
        }
        if(!StringUtils.isEmpty(edate)){
            url.append("&edate=" + edate);
        }
        if(!StringUtils.isEmpty(format)){
            url.append("&format=" + format);
        }
        return url.toString();
    }
}
